﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeliveryDispatch.aspx.cs" Inherits="MLY.Reports.DataReports.DeliveryDispatch1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %> 

<%@ Register Assembly="DevExpress.Web.v11.1.Linq, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
  Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
  Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel"
  TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel"
  TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxLoadingPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1.Export, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title><asp:Literal ID="TitleLiteral" runat="server" Text="<%$ Dict:Report.DeliveryDispatch %>"></asp:Literal></title>
    
    <link href="/Style/General_Style_v9.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/ReportsStylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ToolkitScriptManager ID="ScriptManager1" runat="server"></asp:ToolkitScriptManager>
        <asp:Label ID="ReportTitleLabel" runat="server" Text="<%$ Dict:Report.DeliveryDispatch %>" CssClass="TitleStyle floater"></asp:Label>
        <asp:HiddenField ID="ReportTypeHiddenField" runat="server" />
        <br /><br />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>
            <asp:PostBackTrigger ControlID="ExportToXLS" />
            <asp:PostBackTrigger ControlID="ExportToXLSx" />          
        </Triggers>
        <ContentTemplate>
            
                <table>
                <tr>
                <td>
                    <asp:Label ID="DateTypeTitle" runat="server" Text='<%$Dict:advancedRptPrams.chooseDateFilter: %>' CssClass="regFont"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DatesTypeDDL" runat="server">
                        <asp:ListItem Text='<%$ Dict:clientAddWo.RequestedDelivaryDate %>' Value="1"></asp:ListItem>
                        <asp:ListItem Text='<%$ Dict:clientAddWo.PlannedDelivaryDate %>' Value="2"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                </tr>
                <tr>
                <td>
                    <asp:Label ID="DispatchTypeSelect" runat="server" Text='<%$Dict:Reports.SelectReportType %>' CssClass="regFont"></asp:Label>
                    
                </td>
                <td>
                    <asp:DropDownList ID="IntervalDDL" runat="server">
                        <asp:ListItem Value="1" Text="<%$ Dict:reports.Daily %>"></asp:ListItem>
                        <asp:ListItem Value="7" Text="<%$ Dict:reports.Weekly %>"></asp:ListItem>
                        <asp:ListItem Value="30" Text="<%$ Dict:reports.Monthly %>"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                </tr>
                <tr>
                <td>
                    <asp:Label ID="ChooseProductTitle" runat="server" Text='<%$ Dict:clientWoGrid.ProductDescription %>' CssClass="regFont"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ProductDDL" runat="server"></asp:DropDownList>
                </td>
                </tr>
                <tr>
                <td>
                    <asp:Label ID="GroupByTitleLabel" runat="server" Text='<%$ Dict:reports.groupBy %>' CssClass="regFont"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="GroupByDDL" runat="server">
                        <asp:ListItem Text="<%$ Dict:clientAddWo.CustomerCatalougeCode %>" Value="1"></asp:ListItem>
                        <asp:ListItem Text="<%$ Dict:OrganizationDetails.OrganizationName %>" Value="2"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                </tr>
                <tr> 
                <td colspan="2">
                    <asp:Button ID="RefreshButton" runat="server" Text="<%$ Dict:General.Submit %>" OnClick="RefreshReport" />
                </td>
                </tr>
                </table>
                
                
                
                <br />
            
            <dx:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="ReportGrid"></dx:ASPxGridViewExporter>
            <table cellpadding="5" cellspacing="0">
                <tr>
                <td>
                    <dx:ASPxButton Id="ExportToXLS" runat="server" Text="Export to XLS" UseSubmitBehavior="False"
                        OnClick="btnXlsExport_Click"   ></dx:ASPxButton>
                                      
                </td>
                <td>
                    <dx:ASPxButton Id="ExportToXLSx" runat="server" Text="Export to XLSx" UseSubmitBehavior="False"
                        OnClick="btnXlsxExport_Click"></dx:ASPxButton>
                </td>                
                </tr>
            </table>
            <dx:ASPxGridView ID="ReportGrid" runat="server"  
                 
                 EnableCallBacks="False" SettingsPager-RenderMode="Lightweight"
                 EnableTheming="False" SettingsPager-PageSize="1000"
                 KeyFieldName="Product" 
                 Settings-ShowFilterRow="true" 
                 Settings-ShowGroupButtons="true"
                 Settings-ShowFilterBar="Hidden" Settings-ShowFilterRowMenu="True"
                 Settings-ShowGroupedColumns="True" Settings-ShowGroupPanel="True" 
                 Settings-UseFixedTableLayout="True" >
                <SettingsBehavior AllowFocusedRow="True" ColumnResizeMode="NextColumn" AutoFilterRowInputDelay="2500"  />
                <SettingsPager RenderMode="Lightweight"></SettingsPager>
                <Styles Header-Wrap="True"></Styles>
                <Columns>
                    <dx:GridViewDataTextColumn Caption="<%$ Dict:clientAddWo.CustomerCatalougeCode %>" FieldName="Product" Width="120"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="<%$ Dict:OrganizationDetails.OrganizationName %>" FieldName="OrganizationName" Width="120"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp0" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp1" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp2" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp3" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp4" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp5" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp6" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp7" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp8" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp9" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp10" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp11" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp12" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp13" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp14" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp15" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp16" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp17" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp18" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp19" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Disp20" PropertiesTextEdit-DisplayFormatString="f0"></dx:GridViewDataTextColumn>
                </Columns>
                </dx:ASPxGridView>
                <asp:SqlDataSource ID="ReportDataSource" runat="server" SelectCommandType="StoredProcedure"
                    ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" SelectCommand="SCCOver_DeliveryDispatchReport"></asp:SqlDataSource> 
            
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
